import React, { Component } from 'react'
import { Tabs } from 'antd';
import GlyTable from './GlyTable'
import GlytableSearch from './GlytableSearch'
import { inject, observer } from 'mobx-react'
import Bm from  './Bm'
import Juese from  './Juese'
import './Qxsz.css'
const { TabPane } = Tabs;
@inject('ybs')
@observer
class Qxsz extends Component {
    constructor() {
        super()
        this.state = {
            current: 'mail',
            data:[]
        };
    }
    componentDidMount(){
        this.props.ybs.getglydata()
        let {data} = this.props.ybs
         this.setState({
            data: data,
        });
    }
    render() {
        function callback(key) {
            // console.log(key);
        }
        return (
            <div>
                <Tabs defaultActiveKey="1" onChange={callback}>
                    <TabPane tab="管理员" key="1">
                        <GlytableSearch/>
                        <GlyTable glytabledata={this.state.data} />
                    </TabPane>
                    <TabPane  tab="部门" key="2">
                        <Bm/>
                    </TabPane>
                    <TabPane tab="角色" key="3">
                        <Juese/>
                    </TabPane>
                </Tabs>
            </div>
        )
    }
}

export default Qxsz